<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
<style>
    .box{
        height: 500px;
        width: 500px;
        border: 2px solid black;
        margin: 100px auto;
        display: flex;
        flex-wrap:wrap;
        align-content: center;
        /*折行  wrap意思是折行*/
        /*align-content 控制行间距
            都有这些属性值
            flex-start
             flex-end
             center
             下面这两个是主轴对齐专有方式 
            space-between; 两端对齐
            space-around   距离环绕   自身两边等距
        */
    }
    .box div{
        width: 100px;
        height: 100px;
        border: 2px dashed red;
    }
</style>
</head>
<body>
    <div class="box">
        <div>111</div>
        <div>222</div>
        <div>333</div>
        <div>444</div>
        <div>555</div>
        <div>666</div>
    </div>
</body>
</html>